﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using ZFY.UMC.Identity.Model;

namespace ZFY.UMC.Identity.Controllers
{
    [SecurityHeaders]
    [Authorize]
    public class BaseController : Controller
    {
        static JsonSerializerSettings _serializeOptions = new JsonSerializerSettings
        {
            DateFormatString = "yyyy-MM-dd HH:mm:ss",
            ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver()
        };
        public override JsonResult Json(object data)
        {
            return base.Json(data, _serializeOptions);
        }
    }
}
